package com.example.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

// 代表引用资源文件
@Configuration
@ConfigurationProperties(prefix="com.hnust.opensource2")
// 如果prefix与application.yml中相同，会优先使用yml中的配置
@PropertySource(value="classpath:myresource.properties")
public class Resource {

	private String name;

	private String website;

	private String language;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	@Override
	public String toString() {
		return "Resource [name=" + name + ", website=" + website + ", language=" + language + "]";
	}
}
